import { useReducer } from 'react';

/**
 *  强制刷新组件
 * @returns
 */
const useForceUpdate = () => {
  const [, dispatch] = useReducer((v) => {
    return v + 1;
  }, 0);

  //   console.log('dispatch', dispatch);
  return dispatch;
};

export default useForceUpdate;
